home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / PInterfaces / Patches.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  2.9 KB  |  113 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Patches.p
  3.  
  4.      Contains:    Patch Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 8
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17.  
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT Patches;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __PATCHES__}
  28. {$SETC __PATCHES__ := 1}
  29.  
  30. {$I+}
  31. {$SETC PatchesIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __MACTYPES__}
  35. {$I MacTypes.p}
  36. {$ENDC}
  37.  
  38.  
  39. {$PUSH}
  40. {$ALIGN MAC68K}
  41. {$LibExport+}
  42.  
  43. {$IFC TARGET_OS_MAC }
  44.  
  45. CONST
  46.     kOSTrapType                    = 0;
  47.     kToolboxTrapType            = 1;
  48.  
  49.  
  50. TYPE
  51.     TrapType                            = SignedByte;
  52.  
  53. CONST
  54.     OSTrap                        = 0;                            {  old name  }
  55.     ToolTrap                    = 1;                            {  old name  }
  56.  
  57. {
  58.     GetTrapAddress and SetTrapAddress are obsolete and should not
  59.     be used. Always use NGetTrapAddress and NSetTrapAddress instead.
  60.     The old routines will not be supported for PowerPC apps.
  61. }
  62. {$IFC TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM }
  63. FUNCTION GetTrapAddress(trapNum: UInt16): UniversalProcPtr;
  64.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  65.     INLINE $301F, $A146, $2E88;
  66.     {$ENDC}
  67. PROCEDURE SetTrapAddress(trapAddr: UniversalProcPtr; trapNum: UInt16);
  68.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  69.     INLINE $301F, $205F, $A047;
  70.     {$ENDC}
  71. {$ENDC}
  72. FUNCTION NGetTrapAddress(trapNum: UInt16; tTyp: TrapType): UniversalProcPtr;
  73. PROCEDURE NSetTrapAddress(trapAddr: UniversalProcPtr; trapNum: UInt16; tTyp: TrapType);
  74. FUNCTION GetOSTrapAddress(trapNum: UInt16): UniversalProcPtr;
  75.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  76.     INLINE $301F, $A346, $2E88;
  77.     {$ENDC}
  78. PROCEDURE SetOSTrapAddress(trapAddr: UniversalProcPtr; trapNum: UInt16);
  79.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  80.     INLINE $301F, $205F, $A247;
  81.     {$ENDC}
  82. FUNCTION GetToolTrapAddress(trapNum: UInt16): UniversalProcPtr;
  83.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  84.     INLINE $301F, $A746, $2E88;
  85.     {$ENDC}
  86. PROCEDURE SetToolTrapAddress(trapAddr: UniversalProcPtr; trapNum: UInt16);
  87.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  88.     INLINE $301F, $205F, $A647;
  89.     {$ENDC}
  90. FUNCTION GetToolboxTrapAddress(trapNum: UInt16): UniversalProcPtr;
  91.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  92.     INLINE $301F, $A746, $2E88;
  93.     {$ENDC}
  94. PROCEDURE SetToolboxTrapAddress(trapAddr: UniversalProcPtr; trapNum: UInt16);
  95.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  96.     INLINE $301F, $205F, $A647;
  97.     {$ENDC}
  98. {$IFC TARGET_CPU_PPC }
  99. FUNCTION GetTrapVector(trapNumber: UInt16): UniversalProcHandle;
  100. {$ENDC}
  101. {$ENDC}  {TARGET_OS_MAC}
  102.  
  103. {$ALIGN RESET}
  104. {$POP}
  105.  
  106. {$SETC UsingIncludes := PatchesIncludes}
  107.  
  108. {$ENDC} {__PATCHES__}
  109.  
  110. {$IFC NOT UsingIncludes}
  111.  END.
  112. {$ENDC}
  113.